# Initialization

addi	$s0, $zero, 6		# First Operand
addi	$s1, $zero, 8		# Second Operand
addi	$a0, $zero, 0		# $a0 = 0
addi	$a1, $a0, 4			# $a1 = 4
addi	$v0, $a1, 4			# $v0 = 8
sw	$s0, 0($a0)			# mem[$a0] = $s0
sw	$s1, 0($a1)			# mem[$a1] = $s1

jal Salto
j	Salto
nop

lw	$t0, 0($v0)			# $t0 = mem[$v0]

Eternity: 
beq $zero, $zero, Eternity
Salto:
nop

Multiplication:
lw	$s0, 0($a0)			# $s0 = operand #1
lw	$s1, 0($a1)			# $s1 = operand #2
add	$s2, $zero, $zero		# $s2 contains temp result
add	$s3, $zero, $zero		# $s3 is the loop counter
Loop:
add	$s2, $s2, $s1		# $s2 = $s2 + $s1
addi	$s3, $s3, 1			# $s3 = $s3 + 1
beq	$s3, $s0, End		# if $s3 = $s1 GOTO End
nop
beq	$zero, $zero, Loop	# GOTO Loop
nop
End:
sw	$s2, 0($v0)			# store result in mem[$v1]
jr	$ra
nop